package entities;

import java.io.Serializable;

import org.apache.lucene.search.ScoreDoc;

public class VnScoreDoc implements Serializable, Comparable<VnScoreDoc>{
	private ScoreDoc scoreDoc;
	private String textSearch;
	private String fieldSearch;
	public VnScoreDoc(ScoreDoc scoreDoc) {
		super();
		this.scoreDoc = scoreDoc;
	}

	public ScoreDoc getScoreDoc() {
		return scoreDoc;
	}

	public void setScoreDoc(ScoreDoc scoreDoc) {
		this.scoreDoc = scoreDoc;
	}
	/*
	 * sap xep theo diem giam dan
	 */
	public int compareTo(VnScoreDoc another) {
		// TODO Auto-generated method stub
		if(this.scoreDoc.score<another.scoreDoc.score)
			return 1;
		else if(this.scoreDoc.score>another.scoreDoc.score)
			return -1;
		return 0;
	}

	public String getTextSearch() {
		return textSearch;
	}

	public void setTextSearch(String textSearch) {
		this.textSearch = textSearch;
	}

	public String getFieldSearch() {
		return fieldSearch;
	}

	public void setFieldSearch(String fieldSearch) {
		this.fieldSearch = fieldSearch;
	}
	
	
	
}
